POV-Ray : Newsgroups : povray.animations : Animation Control (time frames I Guess) : Re: Animation Control (time frames I Guess) Server Time
29 Jun 2024 07:18:44 EDT (-0400)
  Re: Animation Control (time frames I Guess)  
From: Tim Nikias v2 0
Date: 14 Sep 2003 19:06:25
Message: <3f64f471@news.povray.org>
I've always done it the same way:

#declare Animation_Time = [Seconds];
#declare Animation_FPS = 25;

These are two basic parameters all my newer Include-
Files making use of animation-capabilities use. I've even
included a small script inside my LSSM which derives
the amount of frames from POV-Internal-Data. Based
on FPS, it can then calculate the amount of seconds.

And then, I either set my animations with values from
0 to 1 (beginning to end of animation) or with values
from 0 to clock*Animation_Time (beginning to end
of animation in seconds).

Now, thats not much for HOW to actually set things
up, but sticking to a certain, obvious style, makes
things easier in the long run. In this case, someone
else can easily set the LSSM and my Particle-System
into one scene, without having to mix different kinds
of timing systems. Also, I like to think in seconds,
rather than animation time. Its easier to visualize.

Most of the time, I do use
#if (clock*Animation_Time < 3)
...
#else
...
#end
or something alike.To have a handy value for any range,
I simply subtract the time when something begins, and
divide it resulting value by the timespan until the next
event occurs.
E.g: Animate from 3rd sec to 5th sec:
#if (clock*Animation_Time>=3 & clock*Animation_Time<=5)
 #declare LocalClock=(clock*Animation_Time-3)/2;
 ...
#end

LocalClock will then run from 0 to 1 during those 2 seconds,
and things can be animated very easily with values from 0 to
1 IMHO.

Regards,
Tim

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: no_lights (@) digitaltwilight.de

> Hi again!
>
> During an animation sequence, if an object is to:
>
>     do something for 2 seconds
>     stay idle for 3 seconds
>     do something for 3 seconds
>
> What method or methods have any of you used in your code for
> this type of control?
>
> Assuming:
>
>     +kff???
>     +ki0 (default)
>     +kf1 (default)
>     And that we encode the final animation at 25 fps.
>
> Would one use something like this to figure out where in time
> we are?
>
> #declare T = frame_number / 25 ;
>
> #if ( T<2 | ( T>5 & T<8 ) )
>     do something
> #end
>
> This seems obvious but maybe there are other proven
> techniques one could use.
>
> Thanks
>
> -- 
> Marc Champagne
> marcch.AT.videotron.DOT.ca
> Montreal, CANADA


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 02.09.2003


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.